This invention relates to a method for compressing waveform data and a device therefore and a device for reproducing waveform data which are available for use in an electronic musical instrument or other tone generation device or a sound signal processing device.
This invention further relates to a method for compressing various waveform data such as a tone source waveform, sound signal waveform or control signal waveform and further relates to a method for compressing various digital data used for tone generation or tone control.
As a method for producing a tone source waveform in an electronic musical instrument, there is a method of sampling and storing a tone which has been actually acoustically sounded by, e.g., a natural musical instrument (e.g., Japanese Laid-open Patent Publication Nos. 54-161313, 62-89093 and 62-94896 etc.). Such external tone sampling system is advantageous in that a tone waveform of a high quality which is equivalent to tone of a natural musical instrument can be obtained but it requires a waveform memory of a large capacity, it must deal with a large amount of waveform data.
For simplifying a memory and circuits and devices relating to the memory, compression of waveform data has been proposed. For example, U.S. Pat. No. 4,916,996 which corresponds to Japanese Laid-Open Patent Publication No. 62-242993 discloses storing of tone waveform data which is compressed by the linear prediction method (LPC). Japanese Patent Publication No. Hei 1-45078 discloses expressing and storing waveform sample data in a floating-point representation consisting of a mantissa section and an exponent section. It is also known that data compression is performed using not only the PCM coding system but other coding systems such as DPCM, ADPCM and delta modulation as a data coding system. U.S. Pat. No. 4,809,577 also discloses a waveform data compression technique.
In the prior art waveform data compression technique, however, waveform data is compressed simply in accordance with a predetermined compression processing resulting in a uniform data compression. It is therefore difficult in the prior art technique to further perform data compression and particularly to perform data compression to a further degree in only a section of a waveform or to perform data compression in different degrees in different sections of a waveform. It is sometimes desired to perform data compression in a different manner in different sections of a waveform in such a manner that, for example, a normal data compression is performed in a section such as an attack portion in which accuracy of waveform should be secured and data compression is performed to a further degree in a section in which accuracy of waveform may be sacrificed. It is not possible to achieve such data compression performed in a different manner depending upon a section of a waveform.
In a data memory device using such data compression method as well as a data memory device storing data of the conventional PCM coding system, data is stored in one-to-one relation in each individual memory address and data length (data size, i.e., a bit number constituting one data) of data to be stored is fixed to a constant value. It is normal, for example, that one data is stored with a data length of 16 bits in an address of 16 bits. There is a special case where an address of 16 bits, for example, is divided into two sections each having 8 bits and two different 8-bit data are stored in the divided address sections. In this case also, data to be stored is of a fixed bit length of 8 bits.
As described above, in the prior art technique, data is stored with a fixed bit length and, therefore, a memory element is wasted in the case of storing data whose effective bit number is shorter than the fixed bit length. In a case, for example, where tone waveform data is to be stored in a manner to cover a maximum amplitude value with a fixed bit length of 16 bits, there occurs a case where the effective bit number is only two or three bits at a sample point of a small amplitude value and, therefore, a memory element for 13 bits or 14 bits per one address is wasted. The number of such memory elements wasted in the above described manner amounts, when totalled, to a number which cannot be neglected and, as a whole, constitutes a factor which prevents an efficient use of the memory device and also prevents reduction of the size of the entire circuitry and reduction of the manufacturing cost.
Japanese Laid open Patent Publication No. Hei 3-180896 (corresponding to U.S. patent application Ser. No. 07/623,129) discloses storing tone data in a memory in the form of data with a variable bit length. In this technique, however, it is not disclosed what specific method or means should be employed to produce data of variable bit length.